//
//  WSBaseView.h
//  WSBaseKit
//
//  Created by zhangcong on 2020/8/13.
//  Copyright © 2020 zhangcong. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <YYGestureRecognizer.h>
#import "WSViewActionProtocol.h"
#import "WSUpdateProtocol.h"



@interface WSBaseView : UIView<WSUpdateProtocol>

@property (nonatomic, strong) UIImage *image;
@property (nonatomic, copy) void (^touchBlock)(WSBaseView *view, YYGestureRecognizerState state, NSSet *touches, UIEvent *event);
@property (nonatomic, copy) void (^longPressBlock)(WSBaseView *view, CGPoint point);


/**
 *  事件分发代理
 */
@property(nonatomic,weak) id<WSViewActionProtocol>delegate;
/**
 *  调用代理分发事件
 *
 *  @param action 事件编号
 */
- (void) didAction:(NSInteger) action;
/**
 *   调用代理分发事件
 *
 *  @param action 事件编号
 *  @param data   额外数据
 */
- (void) didAction:(NSInteger) action data:(id) data;


@end

